## 'data.frame':    259 obs. of  5 variables:
##  $ country  : chr  "US" "US" "US" "US" ...
##  $ date     : Date, format: "2020-10-06" "2020-10-05" ...
##  $ confirmed: num  7499341 7457402 7417845 7382341 7332297 ...
##  $ deaths   : num  210886 210181 209721 209384 208697 ...
##  $ recovered: num  2952390 2935142 2911699 2897322 2873369 ...

GGPLOt2 Plots of Cumulative Cases and Deaths

Source: New York Times

cumm_deaths <-ggplot(df) +geom_line(aes(x=date,y=deaths),lwd=3,col="blue") + 
    scale_x_date(date_breaks = "1 month") +
  scale_y_continuous(labels = comma) +
   theme(axis.text.x=element_text(angle =- 45, vjust = 0.5)) +
  labs(title="US Cumulative Total Deaths",x="Date Reported",y="Cumulative Deaths")
ggplotly(cumm_cases)
ggplotly(cumm_deaths)

GGPLOt2 Plots of Daily Deaths and Cases

Source: European CDPC

Average US Covid-19 Deaths/day

mean((df1death$Deaths))
## [1] 950.0405

Washington University

Institute for Health Metrics and Evaluation

  • Revised US COVID19 Deaths: 363,269 by Jan. 1, 2021 (Updated Oct. 2, 2020).
(363269 - sum(df1death$Deaths)) / 87 # Jan 1, 2021
## [1] 1751.264
sum(df1death$Deaths) + (mean((df1death$Deaths)) * 87)
## [1] 293562.5

Histograms of Daily Cases and Deaths

ggplot(df1) + geom_bar(aes(x=Deaths,fill=..count..),stat="bin")

ggplot(df1) + geom_bar(aes(x=Cases,fill=..count..),stat="bin")